package com.ch;

/**
 * @author chenhong
 * @version 1.0.0
 * @ClassName ListNode.java
 * @Description TODO
 * @createTime 2021年03月18日 16:53:00
 */
public class ListNode {
    int val;
    ListNode next;
    ListNode() {}
    ListNode(int val) { this.val = val; }
    ListNode(int val, ListNode next) { this.val = val; this.next = next; }

    public static void main(String[] args) {
        ListNode head = new ListNode(1);
        ListNode n1 = new ListNode(2);
        ListNode n2 = new ListNode(3);
        head.next = n1;
        n1.next = n2;
        n2.next = null;

        ListNode p = head;
        p.next.next = null;
        System.out.println(head.next.next.val);
    }
}




